﻿<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false"
    CodeFile="ApplyTypeMaintain.aspx.vb" Inherits="WebForm_Manage_ApplyTypeMaintain" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
      <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:HiddenField ID="hiUID" runat="server" />
            <asp:HiddenField ID="hiKind" runat="server" />
            <table width="100%">
                <tr>
                    <td style="text-align: center">
                        <asp:Label ID="lblTitle" runat="server" Font-Bold="True" Font-Size="24px" meta:resourcekey="lblTitle"></asp:Label>
                    </td>
                </tr>
            </table>
            <asp:Label ID="lblsuit_site" runat="server" meta:resourcekey="lblsuit_site"></asp:Label>
            <asp:DropDownList ID="ddlsuit_site" runat="server" AutoPostBack="True" 
                DataSourceID="objDSsite" DataTextField="site_name" DataValueField="site_code">
            </asp:DropDownList>
            <asp:Button ID="btnInsert" runat="server" meta:resourcekey="btnInsert" />
            <br />
            <asp:ObjectDataSource ID="objDSsite" runat="server" SelectMethod="GetAllSite" 
                TypeName="Telecom.BBL.SiteBBL">
                <SelectParameters>
                    <asp:ControlParameter ControlID="hiDBName" Name="dbName" PropertyName="Value" />
                </SelectParameters>
            </asp:ObjectDataSource>
            <asp:ObjectDataSource ID="objDSTelType" runat="server" 
                SelectMethod="GetTelType" TypeName="Telecom.BBL.TelTypeBBL" 
                UpdateMethod="UpdateTelType">
                <UpdateParameters>
                    <asp:Parameter Name="canModi" Type="Boolean" />
                    <asp:Parameter Name="type_code" Type="String" />
                    <asp:Parameter Name="type_name" Type="String" />
                    <asp:ControlParameter ControlID="ddlsuit_site" Name="suit_site" 
                        PropertyName="SelectedValue" Type="String" />
                    <asp:Parameter Name="type_desc" Type="String" />
                    <asp:Parameter Name="NeedApprove" Type="Int16" />
                    <asp:ControlParameter ControlID="hiUID" Name="UID" PropertyName="Value" 
                        Type="String" />
                    <asp:ControlParameter ControlID="hiDBName" Name="dbName" PropertyName="Value" />
                    <asp:Parameter Name="NeedExt" Type="Boolean" />
                    <asp:Parameter Name="FamilyCode" />
                    <asp:Parameter ConvertEmptyStringToNull="False" Name="Message"  DbType  ="String"  DefaultValue =""/>
                </UpdateParameters>
                <SelectParameters>
                    <asp:ControlParameter ControlID="ddlsuit_site" Name="suit_site" 
                        PropertyName="SelectedValue" Type="String" 
                        ConvertEmptyStringToNull="False" />
                    <asp:ControlParameter ControlID="hiKind" ConvertEmptyStringToNull="False" 
                        Name="Kind" PropertyName="Value" Type="String" />
                    <asp:ControlParameter ControlID="hiDBName" Name="dbName" PropertyName="Value" />
                </SelectParameters>
            </asp:ObjectDataSource>
            <asp:HiddenField ID="hiDBName" runat="server" />
            <TServerControl:TGridView ID="gvTelType" runat="server" AllowHoverEffect="True" 
                AllowHoverSelect="True" AllowPaging="True" AutoGenerateColumns="False" DataSourceID="objDSTelType" 
                ShowFooterWhenEmpty="False" ShowHeaderWhenEmpty="True" SkinID="pager" 
                TotalRowCount="0">
                <Columns>
                    <asp:TemplateField>
                        <EditItemTemplate>
                            <asp:Button ID="btnUpdate" runat="server" CommandName="Update" 
                                meta:resourcekey="btnUpdate" />
                            <asp:Button ID="btnCancel" runat="server" CommandName="Cancel" 
                                meta:resourcekey="btnCancel" />
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Button ID="btnEdit" runat="server" CommandName="Edit" 
                                meta:resourcekey="btnEdit" Text="Button" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                    <asp:TemplateField meta:resourcekey="type_code">
                        <EditItemTemplate>
                            <asp:TextBox ID="txttype_code" runat="server" Enabled='<%# Bind("canModi") %>' Text='<%# Bind("type_code") %>'
                                Width="68px"></asp:TextBox>                           
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lbltype_code" runat="server" Text='<%# Bind("type_code") %>' Width="68px"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField meta:resourcekey="type_name">
                        <EditItemTemplate>
                            <asp:TextBox ID="txttype_name" runat="server" Text='<%# Bind("type_name") %>'
                                Width="68px"></asp:TextBox>                           
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lbltype_name" runat="server" Text='<%# Bind("type_name") %>' Width="68px"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                     <asp:TemplateField meta:resourcekey="type_desc">
                        <EditItemTemplate>
                            <asp:TextBox ID="txttype_desc" runat="server" Text='<%# Bind("type_desc") %>'
                                Width="68px"></asp:TextBox>                           
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lbltype_desc" runat="server" Text='<%# Bind("type_desc") %>' Width="68px"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                    <asp:TemplateField meta:resourcekey="NeedApprove">
                         <EditItemTemplate>
                            <asp:TextBox ID="txtNeedApprove" runat="server" Text='<%# Bind("NeedApprove") %>'
                                Width="68px"></asp:TextBox> 
                                                    
                        </EditItemTemplate>
                        <ItemTemplate>
                            
                            <asp:Label ID="lblNeedApprove" runat="server" Text='<%# Bind("NeedApprove") %>' Width="68px"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                    <asp:TemplateField meta:resourcekey="NeedExt">
                        <EditItemTemplate>
                            <asp:CheckBox ID="cbNeedExte"  Checked ='<%# Bind("NeedExt") %>' runat="server"  />                          
                        </EditItemTemplate>
                        <ItemTemplate>
                            
                            <asp:CheckBox ID="cbNeedExt"  Checked ='<%# Bind("NeedExt") %>' runat="server"  Enabled ="False"/>
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                    <asp:TemplateField meta:resourcekey="OnsiteFill">
                        <EditItemTemplate>
                            <asp:CheckBox ID="cbOnsiteFill"  Checked ='<%# Bind("OnsiteFill") %>' runat="server"  />                          
                        </EditItemTemplate>
                        <ItemTemplate>
                            
                            <asp:CheckBox ID="cbOnsiteFill"  Checked ='<%# Bind("OnsiteFill") %>' runat="server"  Enabled ="False"/>
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                    <asp:TemplateField meta:resourcekey="FamilyCode">
                        <EditItemTemplate>
                            <asp:CheckBox ID="cbFamilyCode"  Checked ='<%# Bind("FamilyCode") %>' runat="server"  />                          
                        </EditItemTemplate>
                        <ItemTemplate>
                            
                            <asp:CheckBox ID="cbFamilyCode"  Checked ='<%# Bind("FamilyCode") %>' runat="server"  Enabled ="False"/>
                        </ItemTemplate>
                    </asp:TemplateField>
                  
                    <asp:TemplateField meta:resourcekey="Message">
                        <EditItemTemplate>
                            <asp:TextBox ID="txtMessage" runat="server" Text='<%# Bind("Message") %>'
                                Width="68px"></asp:TextBox>                           
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lblMessage" runat="server" Text='<%# Bind("Message") %>' Width="68px"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                     <asp:TemplateField meta:resourcekey="CrtName">
                        
                        <ItemTemplate>
                            <asp:Label ID="lblCrtName" runat="server" Text='<%# Eval("CrtName") %>' Width="68px"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                    <asp:TemplateField meta:resourcekey="CrtDate">
                        
                        <ItemTemplate>
                            <asp:Label ID="lblCrtDate" runat="server" Text='<%# Eval("CrtDate","{0:d}") %>' Width="68px"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField meta:resourcekey="ModiName">
                        
                        <ItemTemplate>
                            <asp:Label ID="lblModiName" runat="server" Text='<%# Eval("ModiName") %>' Width="68px"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                     <asp:TemplateField meta:resourcekey="ModiDate">
                        
                        <ItemTemplate>
                            <asp:Label ID="lblModiDate" runat="server" Text='<%# Eval("ModiDate","{0:d}") %>' Width="68px"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </TServerControl:TGridView>
            <br />
            
            
            
       </ContentTemplate>
    </asp:UpdatePanel>        
       
</asp:Content>
